<h2><%= link_to l(:contacts_title), :controller => 'settings', :action => 'plugin', :id => 'contacts', :tab => 'tags' %> &#187; <%=h (l(:label_tag) + ": " + @tag.name) %></h2>

<%= form_tag({:action => 'update', :id => @tag, :tab => 'tags' }, :class => "tabular") do %>
  <%= error_messages_for 'tag' %>
<div class="box">
<!--[form:optvalue]-->
<p><label for="tag_name"><%=l(:field_name)%></label>
<%= text_field 'tag', 'name'  %></p>

<p><label for="tag_color"><%=l(:field_color)%></label>
<%= text_field 'tag', 'color_name', :class => "colorpicker"  %>
<!--[eoform:optvalue]-->
</p> 
   
<script>
$(function() {    
   //use this method to add new colors to pallete
   //$.fn.colorPicker.addColors(['000', '000', 'fff', 'fff']);
   
   $('#tag_color_name').colorPicker();
 });

</script>  

</div>

  <%= submit_tag l(:button_save) %>
<% end %>

<%= form_tag({:action => 'destroy', :id => @tag, :tab => 'tags' }) do %>
  <%= submit_tag l(:button_delete) %>
<% end %>    

<% content_for :header_tags do %>
	<%= javascript_include_tag :contacts, :plugin => 'redmine_contacts'  %>
	<%= javascript_include_tag :"jquery.colorPicker.min.js", :plugin => 'redmine_contacts'  %>
	<%= stylesheet_link_tag :contacts, :plugin => 'redmine_contacts' %>
	<%= stylesheet_link_tag :"colorPicker.css", :plugin => 'redmine_contacts' %>
<% end %>
